const yaml = require('yaml');
const fs = require('fs');
const path = require('path');

class YamlConf {

  static load(key) {
    const yamlBuffer = fs.readFileSync(path.resolve(__dirname, '../../egg-config.yml'), 'utf-8');
    return yaml.parse(yamlBuffer)[key];
  }

}

module.exports = YamlConf;
